package com.atguigu.gulimall.order.service;

import com.atguigu.gulimall.order.entity.PaymentInfoEntity;
import com.atguigu.gulimall.order.to.SeckillOrderTO;
import com.atguigu.gulimall.order.vo.OrderConfirmVo;
import com.atguigu.gulimall.order.vo.OrderSubmitVo;
import com.atguigu.gulimall.order.vo.PayVO;
import com.atguigu.gulimall.order.vo.SubmitOrderResponseVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author xufb
 * @email 2635612275@qq.com
 * @date 2023-04-11 12:28:51
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo OrderConfirmVo() throws Exception;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo) throws Exception;

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity order);

    PayVO getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    void handlePayResult(Integer orderStatus, Integer payCode, PaymentInfoEntity paymentInfo);

    void createSeckillOrder(SeckillOrderTO order);
}

